package cn.tudu.boot27.mapeer;

import cn.tudu.boot27.entiry.Hero;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface HeroMapper {
    @Insert("insert into hero values(null,#{name},#{money})")
    void add(Hero hero);
    @Delete("delete from hero where name=#{name}")
     void delete(String name);
    @Update("update hero set name=#{name},money=#{money} where id=#{id}")
    void update(Hero hero);
    @Select("select *from hero")
    List<Hero> select();
}
